﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CSF.BusinessCore.Data;

namespace CSF.Sales.Data
{
    public enum PromotionType
    {
        /// <summary>
        /// 所有商品
        /// </summary>
        All = 0, 
        /// <summary>
        /// 所设产品分类
        /// </summary>
        Category = 1,
        /// <summary>
        /// 指定产品
        /// </summary>
        Product = 2,
        /// <summary>
        /// 指定产品型号
        /// </summary>
        ByModel = 3
    }

    /// <summary>
    /// Author：Robin
    /// Create Date: 2011-9-15
    /// 促销信息
    /// </summary>
    public class Promotion : TransactionConfig
    {
        /// <summary>
        /// 网店id
        /// </summary>
        public int ApplicationId { get; set; }

        /// <summary>
        /// 促销类型
        /// </summary>
        public PromotionType PromotionType { get; set; }

        /// <summary>
        /// 起始日期
        /// </summary>
        public DateTime? FromDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime? ToDate { get; set; }

        /// <summary>
        /// 起始订购数量
        /// </summary>
        public decimal? FromQty { get; set; }

        /// <summary>
        /// 结束订购数量
        /// </summary>
        public decimal? ToQty { get; set; }

        /// <summary>
        /// 起始订购金额
        /// </summary>
        public decimal? FromAmount { get; set; }

        /// <summary>
        /// 结束订购金额
        /// </summary>
        public decimal? ToAmount { get; set; }

        /// <summary>
        /// 折扣率
        /// </summary>
        public decimal Discount { get; set; }

        /// <summary>
        /// 使用特殊的发货时刻表
        /// </summary>
        public int? DeliveryScheduleId { get; set; }

        /// <summary>
        /// 使用指定发货方式
        /// </summary>
        public string DeliveryModeCode { get; set; }
    }
}
